const faker =require('faker');
const Mock = require('mockjs');
const _    = require('lodash');

module.exports = function(){
    return {
        people:_.times(100,function(n){
            return {
                id  : n,
                name: Mock.Random.cname(),
                img : Mock.Random.image('50x50', Mock.Random.color()),
                text: Mock.Random.csentence(8,14),
                time: Mock.Random.date('yyyy-MM-dd'),
                star: Mock.mock({
                    'number|1-100': 100
                })
            }
        }),
        product:_.times(100,function(n){
            return {
                id   : n,
                name : Mock.Random.cname(),
                img  : Mock.Random.image('50x50', Mock.Random.color()),
                content:Mock.Random.csentence(200,300),
                text : Mock.Random.csentence(4,14),
                time : Mock.Random.date('yyyy-MM-dd'),
                price: Mock.mock({
                    'number|1-100': 100
                })
            }
        }),
        news:_.times(100,function(n){
            return {
                id   : n,
                name : Mock.Random.cname(),
                img  : Mock.Random.image('50x50', Mock.Random.color()),
                content:Mock.Random.csentence(200,600),
                text : Mock.Random.csentence(4,14),
                time : Mock.Random.date('yyyy-MM-dd'),

            }
        }),
        carousel:_.times(6,function(n){
            return {
                id   : n,
                name : Mock.Random.cname(),
                img  : Mock.Random.image('50x50', Mock.Random.color()),

                url:Mock.Random.url()
            }
        }),

    }
}
